layui.define(['layer','form'], function(exports) {
    var $ = layui.jquery;
    var layer=layui.layer;
    var form = layui.form();

    //刷新
    $("#btn_ref").click(function(){
        location.reload();
    });

    $('#btn_save1').click(function(){
        $.post('/html/attend/srv/edit_attend.php',$('#form1').serialize(),function(e){
            layer.msg('打卡成功');      
            setTimeout("location.reload()", 2000);
        })
    });  
    $('#btn_save2').click(function(){
        $.post('/html/attend/srv/edit_attend.php',$('#form2').serialize(),function(e){
            layer.msg('打卡成功');       
            setTimeout("location.reload()", 2000);
        })
    });  
    $('#btn_save3').click(function(){
        $.post('/html/attend/srv/edit_attend.php',$('#form3').serialize(),function(e){
            layer.msg('打卡成功');      
            setTimeout("location.reload()", 2000);
        })
    });  
    $('#btn_save4').click(function(){
        $.post('/html/attend/srv/edit_attend.php',$('#form4').serialize(),function(e){
            layer.msg('打卡成功');  
            setTimeout("location.reload()", 2000);
        })
    });  
    exports('attend_edit', {});
});